package cn.zjnu.controller;

public class Code {
    /*
        该类封装了各种提示代码
        末位为1表示操作成功；末位为0表示操作失败
    */


    /*
        登录注册模块需要的Code
    */
    public static final Integer SignUp_OK = 10011;
    public static final Integer SignUp_ERR = 10010;
    public static final Integer LoginIn_OK = 10021;
    public static final Integer LoginIn_ERR = 10020;
    public static final Integer Change_OK = 10031;
    public static final Integer Change_ERR = 10030;

    /*
        购物模块需要的Code
     */
    public static  final Integer GetAll_OK = 20011;
    public static  final Integer GetAll_ERR = 20010;
    public static  final Integer AddGoods_OK = 20021;
    public static  final Integer AddGoods_ERR = 20020;
    public static  final Integer GoodsPlus_OK = 20031;
    public static  final Integer GoodsPlus_ERR = 20030;
    public static  final Integer GoodsReduce_OK = 20041;
    public static  final Integer GoodsReduce_ERR = 20040;

    public static  final Integer GoodsDelete_OK = 20051;
    public static  final Integer GoodsDelete_ERR = 20050;
    public static  final Integer GetGoodsByUserId_OK = 20061;
    public static  final Integer GetGoodsByUserId_ERR = 20060;
    public static final Integer GetAccount_OK = 20071;
    public static  final Integer SettleAccount_OK = 20081;
    public static  final Integer SettleAccount_ERR = 20080;

    /*
        出现异常时需要抛出的错误代码
        分为：业务错误、系统错误、未知错误
    */
    public static final Integer SYSTEM_ERR = 50001;
    public static final Integer SYSTEM_UNKNOWN_ERR = 59999;
    public static final Integer BUSINESS_ERR = 60001;
    /*


     */
    public static final Integer SAVE_OK = 20011;
    public static final Integer UPDATE_OK = 20021;
    public static final Integer DELETE_OK = 20031;
    public static final Integer GET_OK = 20041;

    public static final Integer SAVE_ERR = 20010;
    public static final Integer UPDATE_ERR = 20020;
    public static final Integer DELETE_ERR = 20030;
    public static final Integer GET_ERR = 20040;
}
